package com.recharge.service;

import com.recharge.common.result.ResultDO;
import com.recharge.core.entity.GoodsMerchantEntity;
import com.baomidou.mybatisplus.extension.service.IService;
import com.recharge.domain.query.GoodsMerchantQueryDO;
import com.recharge.domain.vo.GoodsMerchantDO;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author Reagan
 * @since 2020-09-28
 */
public interface GoodsMerchantService extends IService<GoodsMerchantEntity> {
    /**
     * 编辑商品代理商关联
     * @param domain
     * @return ResultDO
     */
    public ResultDO edit(GoodsMerchantDO domain);

    /**
     * 返回系商品代理商关联
     * @param id
     * @return ResultDO
     */
    public ResultDO get(String id);

    /**
     * 删除代理商品组关联
     * @param id
     * @param groupId 代理商品组
     * @param modifier
     * @return
     */
    public ResultDO remove(String id, String groupId, String modifier);

    /**
     * 查找商品代理商关联
     * @param query
     * @return ResultDO
     */
    public ResultDO find(GoodsMerchantQueryDO query);

    /**
     *
     * @param merchantId
     * @return
     */
    public ResultDO getGoodsGroup(String merchantId);

    /**
     *
     *
     * @param groupId
     * @param merchantId
     * @param discount
     * @param userName
     * @return
     */
    public ResultDO updateDiscountBatch(String groupId, String merchantId, Float discount, String userName);
    /**
     * 商品组修改状态
     * @param id
     * @param goodsIds
     * @param status
     * @param modifier
     * @return
     */
    public ResultDO updateStatus(String id, String goodsIds, Integer status, String modifier);

    /**
     * 批量关联商品代理
     * @param param
     * @return
     */
    public ResultDO addBatch(GoodsMerchantDO param);

    /**
     * 根据商品ID和商户ID查询商品的折扣
     * @param goodsId
     * @param merchantId
     * @return
     */
    public ResultDO getGoodsMerchantDiscount(String goodsId, String merchantId);

    /**
     *
     * @param merchantId
     * @return
     */
    public ResultDO listByMerchantId(String merchantId);

    public ResultDO removeByGoodsId(String id, String modifier);

    /**
     * 根据商品ID修改信息
     * @param updateDomain
     * @param goodsId
     * @return
     */
    public ResultDO editByGoodsId(GoodsMerchantDO updateDomain, String goodsId);

    /**
     * 根据调解查询list
     * @param findDomain
     * @return
     */
    public ResultDO findList(GoodsMerchantDO findDomain);

    /**
     * 批量新增
     * @param domainList
     * @return
     */
    public ResultDO saveBatch(List<GoodsMerchantDO> domainList);
}
